package com.example.news.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.news.pojo.entity.User;
import com.example.news.pojo.form.AddUserRoleForm;
import com.example.news.pojo.form.ChangeUserInfoForm;
import com.example.news.pojo.form.RegisterForm;
import com.example.news.pojo.form.UserPageQuery;
import com.example.news.pojo.vo.UserInfoVo;
import com.example.news.utils.result.PageResult;
import com.example.news.utils.result.Result;

public interface UserService extends IService<User> {
    Result<String> addUser(RegisterForm registerForm);

    Result<UserInfoVo> getMineInfo(String token);

    Result<UserInfoVo> getOtherInfo(Integer id);

    PageResult<UserInfoVo> getUserInfoList(UserPageQuery userPageQuery);

    Result<String> updateUserInfo(ChangeUserInfoForm changeUserInfoForm);

    Result<String> updateUserStatus(Integer id, Integer status);

    Result<String> deleteUser(Integer id);

    Result<String> deleteMine(String token);

    Result<String> addUserRole(AddUserRoleForm addUserRoleForm);
}
